const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)

const plugins = []
if (IS_PROD) {
	plugins.push('transform-remove-console')
}

module.exports = {
	presets: [
		'@vue/app',
		[
			'@babel/preset-env',
			{
				'useBuiltIns': 'entry'
			}
		]
	],
	plugins,
	sourceType: 'unambiguous'
	// if your use import on Demand, Use this code
	// ,
	// plugins: [
	// 	['import', {
	// 		'libraryName': 'ant-design-vue',
	// 		'libraryDirectory': 'es',
	// 		'style': false // `style: true` 会加载 less 文件
	// 	}]
	// ]
}
